1. Field of the Invention
The present invention generally relates to variable processing of user interfaces. More particularly, the invention relates to controlling the rendering of user interface elements.
2. Description of the Related Art
In a data language, including hierarchical data languages and markup languages, including XML-based languages, User Interface (UI) elements presented on a display are given an order for layout. (note: a UI element is something that may be presented on the screen. A code element, for example, may be a line of code or a tag in an XML based language. A UI element may be characterized by one or more code elements. Further, the code element may not describe a presentation, i.e., it may describe a behavior)
The layout order is typically defined by how the code elements associated with the UI element are declared in the language. When painting (or rendering) these UI elements to the display, the order of painting follow the layout order.
On a display, the horizontal and vertical, length and width, etc. are typically referred to in “x-y” coordinates identifying their representation in an x-y plane. When presenting a UI element in a presentation, their “z-order” refers to the order in which they are place on with respect to each other. While all UI elements are typically viewed in the x-y plane, the z-order of presentation is of concern because UI elements rendered on top of another may (unless they have some transparency) cover UI elements rendered below it.
Using XML as an example, a user interface (UI) specified in XML has an implicit paint order for UI elements identical to the order in which they are declared in the code. A complex UI requires the ability to allow visual UI elements to be drawn on top of other UI elements (declared later in the XML sequence). Therefore, there is a need to able to change the z-order of rendering.
Current UI data language schemes do not address this problem or offer inefficient solutions to the problem. Specifically, Scalar Vector Graphics (SVG) version 2 has proposed addressing z-order control. The mechanism to provide this control has not been established, or defined. Some indications show that they may use an index. Use of an index for z-control does suffer from clipping which is undesirable in a UI.
Another solution included creating several versions of pages containing the UI elements to be presented, each page varying the z-order of the associated code elements. However, this solution involves additional resources by requiring the development of additional pages, storing of pages and maintaining changes to the code across multiple pages and is a brute force, i.e. inefficient, way of dealing with the dynamic control of the z-order.